<template>
    <div>
        <tr id="mt" v-for="(m,index) in list" :key="index">
            {{m.id}}--kk
            {{m.name}}
            <img :src='m.image'>
        </tr>
        
    </div>
</template>

<script>
import axios from 'axios'
import  '../mock/mock.js'
export default {
    name:'Team',
    data(){
        return{
            list:[]
        }
    },
    methods:{
        getList(){
            // 利用axios获取数据
            axios({
                method:'get',
                // url:'http://3030.cn'
                url:'http://localhost:3000/news'
            }).then((res)=>{
                console.log(res);
                this.list = res.data.list;//这个一定要注意，data.list才是数组
            }).catch((err)=>{
                console.log(err)
            })
        }
    },
    mounted:function(){
        this.getList();
    }
}
</script>